README file for

"Human Capital and Climate Change", 
by Noam Angrist, Kevin Winseck, Harry Patrinos, and Joshua Graff Zivin.
	
	
------------------------------------------------------------------------------------------------------------------------------
Code 
(Primarily Stata with two R steps that only produce figures and are not necessary to procede with other Stata steps)
------------------------------------------------------------------------------------------------------------------------------

Main.do
	Runs all the Stata files with no intervention other than setting the current directory.
	Inputs:
		ECA-compulsoryschoolinglaws_2022-05-06.xlsx
	Outputs:
		minEduPanel.dta 

1_ParseCSLs.do
	Parse the spreadsheet of compulsory schooling laws to define the instrument.
	Inputs:
		ECA-compulsoryschoolinglaws_2022-05-06.xlsx
	Outputs:
		minEduPanel.dta 


2_ConstructData.do
	Merge ESS data together and with CSL data, and construct necessary variables for analysis.
	Inputs:
		minEduPanel.dta *This is a cleaned version of the WB spreadsheet, created by "1_ParseCSLs.do"
		ESS9e03_1.dta *These are the raw ESS files downloaded from ESS
		ESS8e02_2.dta
		ESS7e02_2.dta
		ESS6e02_4.dta
		ESS5e03_4.dta
		ESS4e04_5.dta
		ESS3e03_7.dta
		ESS2e03_6.dta
		ESS1e06_6.dta
	Outputs:
		Cleaned_ESS.dta

3_FirstStage.do
	Make table of first stages and indicators for which reforms should be kept in
		which specifications (positive significant reforms, positive, or all).
	Inputs:
		Cleaned_ESS.dta
	Outputs:
		Cleaned_ESS_withFirstStage.dta
		FirstStage.tex (Appendix Table A5)	

4_SecondStage.do
	Perform second stage analysis, main outcomes of the paper, includes robust estimator.
	Inputs:
		Cleaned_ESS_withFirstStage.dta
	Outputs:
		Table2PanelA.tex
		Table2PanelB.tex
		Table3PanelA.tex
		Table3PanelB.tex
		Table3PanelC.tex
		SecondStage_GreenVoting_byCountry.tex (Appendix Table A3)

AggregateCountryEstimates_Correlations.R 
	Takes in the output from 4_SecondStage.do manually entered into the code to produce
		a scatterplot of standard estimates vs. our Country-Averaged Treatment Effect estimates.
	Inputs:
		Manually entered coefficients from the output of 4_SecondStage.do
	Outputs:
		Appendix Figure A4

5_SecondStageFigures.do
	Make second stage figures (coefficient plots).
	Inputs:
		Cleaned_ESS_withFirstStage.dta
	Outputs:
		Figure2.png
		FigureA3.png

6_RobustnessLeaveOneOut.do
	Make figures testing robustness and sensitivity.
	Inputs:
		Cleaned_ESS_withFirstStage.dta
	Outputs:
		RobustnessLeaveOneOut_Reform_beliefs.tex
		RobustnessLeaveOneOut_Reform_behaviors.tex
		RobustnessLeaveOneOut_Reform_policy.tex
		RobustnessLeaveOneOut_Reform_voting.tex
		
		RobustnessLeaveOneOut_Reform_beliefs.csv
		RobustnessLeaveOneOut_Reform_behaviors.csv
		RobustnessLeaveOneOut_Reform_policy.csv
		RobustnessLeaveOneOut_Reform_voting.csv	
		
		RobustnessLeaveOneOut_Country_beliefs.tex
		RobustnessLeaveOneOut_Country_behaviors.tex
		RobustnessLeaveOneOut_Country_policy.tex
		RobustnessLeaveOneOut_Country_voting.tex
		
		RobustnessLeaveOneOut_Country_beliefs.csv
		RobustnessLeaveOneOut_Country_behaviors.csv
		RobustnessLeaveOneOut_Country_policy.csv
		RobustnessLeaveOneOut_Country_voting.csv
			
		BalanceTest_AnyReform.tex (Appendix Table A6)

7_LeaveOneOutFigures.R 
	Creates the boxplots from the leave-one-out tests performed in 6_RobustnessLeaveOneOut.do.
	Inputs:
		RobustnessLeaveOneOut_Reform_beliefs.csv
		RobustnessLeaveOneOut_Reform_behaviors.csv
		RobustnessLeaveOneOut_Reform_policy.csv
		RobustnessLeaveOneOut_Reform_voting.csv	
		RobustnessLeaveOneOut_Country_beliefs.csv
		RobustnessLeaveOneOut_Country_behaviors.csv
		RobustnessLeaveOneOut_Country_policy.csv
		RobustnessLeaveOneOut_Country_voting.csv	
	Outputs:
		Appendix Figure A3

8_Correlations.do
	Make correlations table for appendix.
	Inputs:
		Cleaned_ESS_withFirstStage.dta
	Outputs:
		CorrelationsTable.tex (Appendix Table A1)
9_ValidityBalanceTest.do
	Make validity and balance test tables.
	Inputs:
		Cleaned_ESS_withFirstStage.dta
	Outputs:
		BalanceTest_AnyReform.tex (Appendix Table A6)
		Compliers.tex (Appendix Table A4)
		Table2PanelA_placebo.tex (Appendix Table A7)



------------------------------------------------------------------------------------------------------------------------------
Data
------------------------------------------------------------------------------------------------------------------------------

Two fundamental data sources: 
	- Compulsory Schooling Laws database compiled by our World Bank Colleagues, included in this replication package.
		Variable names are self-explanatory and 1_ParseCSLs.do appropriately processes this data.
		
		ECA-compulsoryschoolinglaws_2022-05-06.xlsx
		
	- ESS raw survey data downloaded in Stata .dta format from https://www.europeansocialsurvey.org/
		See the accompanying data dictionaries provided with data downloads.
		
		ESS9e03_1.dta 
		ESS8e02_2.dta
		ESS7e02_2.dta
		ESS6e02_4.dta
		ESS5e03_4.dta
		ESS4e04_5.dta
		ESS3e03_7.dta
		ESS2e03_6.dta
		ESS1e06_6.dta
		
		

------------------------------------------------------------------------------------------------------------------------------
Software
------------------------------------------------------------------------------------------------------------------------------

Stata Version 17
R Version 2022.07.2+576

Run on Ubuntu 22.04.3 LTS
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

